<template>
  <view>
    <headBar title="精绝壁纸表情包"></headBar>
    <view class="xmain">
      <view>
        <image :src="url" style="width:100%;"></image>
      </view>
      <view>
        <button type="primary" @click="download()">下载</button>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      url: ''
    }
  },
  onLoad(e) {
    var t = this;
    if (e.url) {
      t.url = e.url;
    }
  },
  methods: {
    download(){
      var t = this;
	  const urlPath = 'http://cdn.quick365.cn/xjy/upload/d1/b3fe7e5de3e146231be8903cda642d.png';
      uni.saveImageToPhotosAlbum({
        filePath: urlPath,
        success: function () {
          console.log('save success');
        },fail:function(res){
          console.log("fail");
          console.log(res);
        }
      });
    }
  }
}
</script>

<style>

</style>
